package com.rui.patterns.decorator;

/**
 * @author : [锐神NO.3]
 * @version : [v1.0]
 * @className : Bacon
 * @createTime : [2022/2/22 16:29]
 * @description : [培根类]
 */

public class Bacon extends Garnish{

    public Bacon(FastFood fastFood){
        super(fastFood, 2, "培根");
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().cost();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
